package tests;

import common.Utils;
import org.openqa.selenium.By;

public class EnrollPage extends Utils {

    public static String url = "http://127.0.0.1:58080/sign-up.html";
    public EnrollPage() {
        super(url);
    }

    /*
    * 注册账号成功
    * */
    public void EnrollSuc() throws InterruptedException {
        driver.findElement(By.cssSelector("#username")).sendKeys("Xxx");
        driver.findElement(By.cssSelector("#nickname")).sendKeys("Xxx");
        driver.findElement(By.cssSelector("#password")).sendKeys("123");
        driver.findElement(By.cssSelector("#passwordRepeat")).sendKeys("123");
        driver.findElement(By.cssSelector("#policy")).click();

        driver.findElement(By.cssSelector("#submit")).click();
        Thread.sleep(3000);
        driver.quit();
    }

}
